fix(dev): allow configurable Postgres and Redis host ports#2486
Open
saadaltafofficial wants to merge 1 commit into
Open
fix(dev): allow configurable Postgres and Redis host ports#2486saadaltafofficial wants to merge 1 commit into
saadaltafofficial wants to merge 1 commit into
Conversation
Defaults stay 5432/6379; remap via PGPORT / BUZZ_REDIS_HOST_PORT when local services already own the standard ports. Setup validates URL/port pairs and checks collisions on the configured ports. Closes block#2479 Signed-off-by: saadaltafofficial <saadbeenco@gmail.com>
saadaltafofficial
force-pushed
the
fix/configurable-dev-ports
branch
from
July 23, 2026 08:45
5f39b89 to
4ddf4b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces flexible host port configuration for Postgres and Redis, making it easier to run the development environment alongside local database services (like those installed via Homebrew) without port conflicts. The
.env.example,docker-compose.yml, andscripts/dev-setup.shhave been updated to support remapping host ports and to validate that environment variables and connection URLs remain consistent. The setup script now also checks for local Postgres/Redis processes that would block Docker from binding the desired ports and provides clear error messages and remediation steps.The most important changes are:
Flexible host port configuration:
PGPORTandBUZZ_REDIS_HOST_PORTenvironment variables to.env.exampleto allow remapping the host ports for Postgres and Redis, with clear documentation and examples. (.env.example) [1] [2] [3]docker-compose.ymlto use${PGPORT:-5432}and${BUZZ_REDIS_HOST_PORT:-6379}for publishing container ports, making host port selection dynamic. (docker-compose.yml) [1] [2]Environment validation and improved setup safety:
scripts/dev-setup.shto extract ports from URLs, validate that environment variables and URLs match, and fail early if misconfigured (e.g.,PGPORTdoes not matchDATABASE_URL). [1] [2]scripts/dev-setup.shto detect and block setup if local Postgres or Redis instances are already listening on the desired ports, with actionable error messages and instructions for resolving conflicts.